package org.example.web;

import com.alibaba.druid.pool.DruidDataSource;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.example.entity.Order;
import org.example.mapper.OrderMapper;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RequestMapping("/api")
@RestController
public class ShardingController {
    @Resource
    private OrderMapper orderMapper;

    @PostMapping("")
    public void insert() {
        LambdaQueryWrapper<Order> wrapper = new LambdaQueryWrapper<Order>()
                .between(Order::getOrderId, 990_000_000L, 1_000_000_000L);
        List<Order> list = orderMapper.selectList(wrapper);
    }
}
